package io.yunho.spring.cloud.stream.rocketmq.controller;

import io.yunho.spring.cloud.stream.rocketmq.basic.ScProducer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: Jason
 * @date: 2021/4/12 21:01
 * @description:
 */
@RestController
@RequestMapping("/MQTest")
public class RocketMQController {
    @Resource
    private ScProducer scProducer;
    @GetMapping("/send")
    public String sendMessage(String message){
        scProducer.sendMessage(message);
        return "消息发送完成";
    }
}
